package guiTest;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

public class StandardRenderer extends JLabel implements TableCellRenderer 
{
	public StandardRenderer()
	{
		setOpaque(true);
	}
	
	public Component getTableCellRendererComponent(JTable table, Object value,
	     boolean isSelected, boolean hasFocus, int row, int column)
	{
		if(isSelected)
		{
			setBackground(Color.yellow);
		}
		else
		{
			setBackground(Color.white);			
		}
		
		setFont(new Font(Settings.FONT_NAME, Font.PLAIN, 18));
		setText(value.toString());
				
		return this;
	}
}

